﻿@model SlamDunk.CMS.Model.ViewModel.LinkCategoryView

@{
    ViewBag.Title = "修改链接分类信息";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section header{
    <script type="text/javascript">
        $(function () {

        });
        //提交表单完成后执行方法
        function editFinished(jsonData) {
            if (jsonData.Status == '1') {
                window.top.window.$.messager.alert('OK', jsonData.Message);     //主窗口弹出消息提示
                $.globalParas.updateDataGridInTab();                                           //清除选中，刷新表格
                $.globalParas.closeComWindow();                                                //关闭弹出窗口
            } else {
                window.top.window.$.messager.alert('Error', jsonData.Message);   //主窗口弹出消息提示
            }
        }
    </script>
    <style type="text/css">
        #dvIframe {
            margin-top: 15px;
            width: 318px;
            float: left;
        }

        #dvDep {
            margin-top: 18px;
            float: left;
        }

        #tblEdit {
            width: 300px;
            margin: 5px auto 0;
            text-align: right;
        }

            #tblEdit td input, textarea {
                width: 150px;
            }

        .tdValidate {
            text-align: right;
            color: #ff0000;
        }

        .tdContent {
            text-align: left;
        }
    </style>
}

@using (Ajax.BeginForm("EditConfirm", "LinkCategory", new AjaxOptions { OnSuccess = "editFinished" }, new { id = "frmEdit" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    @Html.HiddenFor(x => x.Id)
    <div id="dvIframe">
        <table id="tblEdit">
            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.CategoryName)：</td>
                <td class="tdContent">@Html.EditorFor(x => x.CategoryName, new { id = "txtCategoryName" })</td>
            </tr>
            <tr>
                <td class="tdValidate" colspan="2">@Html.ValidationMessageFor(x => x.CategoryName)</td>
            </tr>
            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.Sort)：</td>
                <td class="tdContent">@Html.EditorFor(x => x.Sort, new { id = "txtSort" })</td>
            </tr>
            <tr>
                <td class="tdValidate" colspan="2">@Html.ValidationMessageFor(x => x.Sort)</td>
            </tr>
            <tr>
                <td></td>
                <td class="tdContent">
                    <a href="#" onclick="javascript: $('#frmEdit').submit();" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">修改</a>
                    <a href="#" onclick="javascript: $.globalParas.closeComWindow();" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'">取消</a>
                </td>
            </tr>
        </table>
    </div>
}